﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data.Mapping
{
    public partial class WXVerificationCodeMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WXVerificationCode>
    {
        public WXVerificationCodeMap()
        {
            ToTable("mc_WXVerificationCode", "dbo");

            HasKey(t => t.Id);
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();

            HasOptional(t => t.Merchant)
               .WithMany()
               .HasForeignKey(d => d.UserId)
               .WillCascadeOnDelete(false);
        }
    }
}
